<div class="container">
  <h2>{% trans 'Showing create queries' %}</h2>

  {% if tables.tables is not empty %}
    <div class="card mb-3">
      <div class="card-header">{% trans 'Tables' %}</div>
      <div class="card-body">
        <table class="table">
          <thead>
            <tr>
              <th>{% trans 'Table' %}</th>
              <th>{% trans 'Create table' %}</th>
            </tr>
          </thead>
          <tbody>
            {% for table in tables.tables %}
              <tr>
                <td><strong>{{ table.name|raw }}</strong></td>
                <td>{{ table.show_create|raw }}</td>
              </tr>
            {% endfor %}
          </tbody>
        </table>
      </div>
    </div>
  {% endif %}

  {% if tables.views is not empty %}
    <div class="card">
      <div class="card-header">{% trans 'Views' %}</div>
      <div class="card-body">
        <table class="table">
          <thead>
            <tr>
              <th>{% trans 'View' %}</th>
              <th>{% trans 'Create view' %}</th>
            </tr>
          </thead>
          <tbody>
            {% for view in tables.views %}
              <tr>
                <td><strong>{{ view.name }}</strong></td>
                <td>{{ view.show_create|raw }}</td>
              </tr>
            {% endfor %}
          </tbody>
        </table>
      </div>
    </div>
  {% endif %}
</div>
